{% extends "base/base.html" %}
{% load taggit_templatetags2_tags %}
{% load staticfiles %}

{% block content %}
<div class="card text-white bg-dark">
    <div class="card-body">
        <h1 class="card-title">Most popular tags</h1>
        <div class="card-text">
            {% get_tagcloud as tags %}
            {% for tag in tags %}
            {% if tag.num_times %}
            <font size="{{ tag.weight|floatformat:0 }}">
                <a href="{% url 'tag:tag' tag.slug %}" class="badge badge-pill badge-success">{{ tag }} <span class="badge badge-pill badge-secondary">{{ tag.num_times }}</span></a>
            </font>
            {% endif %}
            {% endfor %}
        </div>
    </div>
</div>
{% endblock %}
